package com.gitee.cirnochat.user.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.gitee.cirnochat.common.model.vo.resp.PageVo;
import com.gitee.cirnochat.user.model.entity.UserBlock;
import com.gitee.cirnochat.user.model.vo.resp.UserVo;

/**
* @author FlanChan
* @description 针对表【user_block_list(用户拉黑列表)】的数据库操作Service
* @createDate 2025-04-20 12:35:47
*/
public interface UserBlockListService extends IService<UserBlock> {

    /**
     * 检查该用户A是否拉黑用户B
     * @param userAId
     * @param userBId
     * @return
     */
    boolean isBlocked(Long userAId, Long userBId);

    /**
     * 分页查询用户拉黑列表
     *
     * @param page
     * @param size
     * @param sort
     * @param userId
     * @return
     */
    PageVo<UserVo> pageBlockUsers(int page, int size, int sort, Long userId);

    /**
     * 添加拉黑用户
     * @param blockId
     * @param userId
     */
    void addBlockUser(Long blockId, Long userId);

    /**
     * 移除拉黑用户
     * @param blockId
     * @param request
     */
    void removeBlockUser(Long blockId, Long userId);
}
